﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Deliverordersum.aspx.cs" Inherits="qy_54tss_Admin_Sale_valetorder" %>

<%@ Register Src="~/Admin/Banner.ascx" TagName="TogoBanner" TagPrefix="uc1" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="~/Admin/Foot.ascx" TagName="Foot" TagPrefix="uc2" %>
<%@ Register Src="~/Admin/Adleft.ascx" TagName="left" TagPrefix="uc3" %>
<%@ Register TagPrefix="epc" Namespace="Hangjing.Control" Assembly="Hangjing.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>配送员统计-
        <%= WebUtility.GetMyName() %></title>
    <link href="../css/reset.css" rel="stylesheet" type="text/css" />
    <link href="../css/menu.css" rel="stylesheet" type="text/css" />
    <link href="../css/boxes.css" rel="stylesheet" type="text/css" />
    <link href="../css/divDialog.css" rel="stylesheet" type="text/css" />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="../css/iestyles.css" media="all" />
    <![endif]-->
    <!--[if lt IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/below_ie7.css" media="all" />
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="../css/ie7.css" media="all" />
    <![endif]-->

    <script type="text/javascript" src="../javascript/DatePicker/WdatePicker.js"></script>

    <script src="../javascript/jquery-1.3.2.js" type="text/javascript"></script>

    <script src="../javascript/Common.js" type="text/javascript"></script>

    <script src="../javascript/ShowDivDialog.js" type="text/javascript"></script>

    <script src="../javascript/ScollTop.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        AddLoadFun(init);

        var Table;
        function init() {
            Table = new CheckTable("grid_table");
            $(".grid_data tr").mouseover(function () { $(this).addClass("on-mouse"); }).mouseout(function () { $(this).removeClass("on-mouse"); });
            $(".grid_data tr:even").addClass("even pointer");
            $("#loading-mask").hide();



        }

        function Del() {
            var nums = Table.GetChecks();
            if (nums == undefined || nums.length == 0) {
                alert("请选择要删除的订单!");
                return false;
            }
            document.getElementById("hdDels").value = ArrayToString(nums);
            return DelConfirm();
        }

        function jDel() {
            var ddlgroup = $("#ddlgroup").val();
            if (ddlgroup === "-1") {
                alert("请选择要发送的群组!");
                return false;
            }
            var nums = Table.GetChecks();
            if (nums == undefined || nums.length == 0) {
                alert("请选择要操作的记录!");
                return false;
            }
            document.getElementById("hdDels").value = ArrayToString(nums);
            showload_super();
            return true;
        }



        ///type=0表示搜索昨天的，1表示今天的。
        function daysearch(type) {
            var timestart = "";
            var timeend = "";
            if (type == "0") {
                timestart = $("#hfyestoday").val() + "";
                timeend = $("#hfyestoday").val() + "";
            }
            else {
                timestart = $("#hftoday").val() + "";
            }
            $("#tbStartTime").val(timestart);
            $("#tbEndTime").val(timeend);
        }


    </script>

    <style type="text/css">
        .summary {
            border: 1px solid #ccc;
        }

            .summary th {
                color: #333333;
                text-align: center;
                border: 1px solid #ccc;
            }

            .summary td {
                color: #333333;
                text-align: center;
                border: 1px solid #ccc;
                height: 25px;
                line-height: 25px;
            }

            .summary .tableft {
                padding-left: 3px;
                text-align: left;
            }
    </style>

    <style type="text/css">
        table th {
            white-space: nowrap;
        }

        table td {
            white-space: nowrap;
        }

        body, table {
            font-size: 12px;
        }

        table {
            empty-cells: show;
            border-collapse: collapse;
            margin: 0 auto;
        }

        h1, h2, h3 {
            font-size: 12px;
            margin: 0;
            padding: 0;
        }

        table.tab_css_1 {
            border: 1px solid #cad9ea;
            color: #666;
        }

            table.tab_css_1 th {
                background-repeat: repeat-x;
                line-height: 30px;
            }

            table.tab_css_1 td, table.tab_css_1 th {
                border: 1px solid #cad9ea;
                padding: 0 1em 0;
            }

            table.tab_css_1 tr.tr_css {
                height: 30px;
            }
    </style>

</head>
<body>
    <form id="form1" runat="server">

        <asp:HiddenField ID="hfyestoday" runat="server" />
        <asp:HiddenField ID="hftoday" runat="server" />


        <asp:HiddenField ID="hfflag" runat="server" />
        <asp:HiddenField ID="hdDels" runat="server" />
        <asp:HiddenField runat="server" ID="hfstate" Value="-1" />
        <epc:Hint ID="Hint1" runat="server" HintImageUrl="../images/Control" />
        <div class="wrapper">
            <!--banner start-->
            <uc1:TogoBanner runat="server" ID="Banner" />
            <!--banner end-->
            <!--center start-->
            <div class="middle" id="anchor-content">
                <div id="page:main-container">
                    <div class="columns ">
                        <div class="side-col" id="page:left">
                            <uc3:left runat="server" ID="adleft" />
                        </div>
                        <div class="main-col" id="content">
                            <div class="main-col-inner">
                                <div id="divMessages">
                                </div>
                                <fieldset class="AdminSearchform">
                                    <legend>查询条件 </legend>

                                    <table border="0" cellpadding="0" cellspacing="0" style="margin-left: 10px; float: left;"
                                        class="condition_table postdata">


                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span>骑士名称：</span>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="tbdelivername" runat="server" CssClass="j_text"></asp:TextBox>
                                                &nbsp;

                                                         <asp:DropDownList ID="ddldelflag" runat="server" CssClass="j_select">
                                                             <asp:ListItem Value="-1">状态</asp:ListItem>
                                                             <asp:ListItem Value="0" Text="正常"></asp:ListItem>
                                                             <asp:ListItem Value="1" Text="删除"></asp:ListItem>

                                                         </asp:DropDownList>
                                            </td>
                                        </tr>


                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span>时间：</span>
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" CssClass="j_text" ID="tbStartTime" Width="140px" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" reg="\S" tip="请选择时间"></asp:TextBox>
                                                至
                                                    <asp:TextBox runat="server" ID="tbEndTime" CssClass="j_text" Width="140px" onfocus="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" reg="\S" tip="请选择时间"></asp:TextBox>
                                            </td>
                                        </tr>


                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span style="width: 160px;">订单状态：</span>
                                            </td>
                                            <td>
                                                <asp:CheckBoxList runat="server" ID="rblstate" RepeatDirection="Horizontal">
                                                </asp:CheckBoxList>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span style="width: 160px;">排除导入的订单：</span>
                                            </td>
                                            <td>
                                                <asp:CheckBox runat="server" ID="cbremoveexcel" RepeatDirection="Horizontal"></asp:CheckBox>
                                            </td>
                                        </tr>


                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span style="width: 160px;">排除饿了么订单：</span>
                                            </td>
                                            <td>
                                                <asp:CheckBox runat="server" ID="cbremoveele" RepeatDirection="Horizontal"></asp:CheckBox>
                                            </td>
                                        </tr>


                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span>条件：</span>
                                            </td>
                                            <td>
                                                <asp:DropDownList runat="server" ID="ddlparams" class="j_select">
                                                    <asp:ListItem Text="选择参数" Value="-1"></asp:ListItem>


                                                    <asp:ListItem Text="配送费" Value="OrderTotal"></asp:ListItem>
                                                    <asp:ListItem Text="订单数" Value="ordercount"></asp:ListItem>

                                                    <asp:ListItem Text="日均配送费" Value="perdayshopdiscountmoney"></asp:ListItem>
                                                    <asp:ListItem Text="日均订单数" Value="perdayordercount"></asp:ListItem>

                                                    <asp:ListItem Text="每单计时" Value="orderusetime"></asp:ListItem>
                                                    <asp:ListItem Text="每单配送时间 " Value="sendtime"></asp:ListItem>
                                                </asp:DropDownList>


                                                <asp:DropDownList runat="server" ID="ddlop" Style="width: 80px;">
                                                    <asp:ListItem Text="大于" Value=">"></asp:ListItem>
                                                    <asp:ListItem Text="小于" Value="<"></asp:ListItem>
                                                    <asp:ListItem Text="等于" Value="="></asp:ListItem>
                                                    <asp:ListItem Text="大于等于" Value=">="></asp:ListItem>
                                                    <asp:ListItem Text="小于等于" Value="<="></asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:TextBox ID="tbfirst" runat="server" Style="width: 50px;" CssClass="j_text" reg="^[-+]?\d+(\.\d+)?$" tip="格式错误,请输入数字" canbenull="y"></asp:TextBox>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td align="right" class="tab_label">
                                                <span>商家名称：</span>
                                            </td>
                                            <td>
                                                <asp:TextBox ID="tbshopname" runat="server" CssClass="j_text"></asp:TextBox>

                                                <asp:DropDownList ID="ddlcity" runat="server" CssClass="j_select" Width="100" AppendDataBoundItems="true">
                                                    <asp:ListItem Value="0">所有城市</asp:ListItem>
                                                </asp:DropDownList>



                                                &nbsp;
                                                          <asp:DropDownList ID="ddlGpsIMEI" runat="server" CssClass="j_select" AppendDataBoundItems="true">
                                                              <asp:ListItem Value="-1">群组</asp:ListItem>
                                                          </asp:DropDownList>


                                                &nbsp;
                                                          <asp:DropDownList ID="ddreveint1" runat="server" CssClass="j_select" AppendDataBoundItems="true">
                                                              <asp:ListItem Value="-1">岗位</asp:ListItem>
                                                              <asp:ListItem Value="0" Text="配送员"></asp:ListItem>
                                                              <asp:ListItem Value="10" Text="组长"></asp:ListItem>
                                                              <asp:ListItem Value="20" Text="副主管"></asp:ListItem>
                                                              <asp:ListItem Value="30" Text="主管"></asp:ListItem>
                                                              <asp:ListItem Value="40" Text="副经理"></asp:ListItem>
                                                              <asp:ListItem Value="50" Text="经理"></asp:ListItem>

                                                          </asp:DropDownList>

                                                &nbsp;

                                                         <asp:DropDownList ID="ddlpost" runat="server" CssClass="j_select" AppendDataBoundItems="true">
                                                             <asp:ListItem Value="-1">职位</asp:ListItem>
                                                             <asp:ListItem Value="100" Text="全职"></asp:ListItem>
                                                             <asp:ListItem Value="90" Text="兼职"></asp:ListItem>

                                                         </asp:DropDownList>

                                                &nbsp;
                                                         <asp:DropDownList ID="ddlgrade" runat="server" CssClass="j_select" AppendDataBoundItems="true">
                                                             <asp:ListItem Value="-1">等级</asp:ListItem>
                                                             <asp:ListItem Value="1" Text="1星"></asp:ListItem>
                                                             <asp:ListItem Value="2" Text="2星"></asp:ListItem>
                                                             <asp:ListItem Value="3" Text="3星"></asp:ListItem>
                                                             <asp:ListItem Value="4" Text="4星"></asp:ListItem>
                                                             <asp:ListItem Value="5" Text="5星"></asp:ListItem>

                                                         </asp:DropDownList>

                                                &nbsp;
                                                         <asp:DropDownList ID="ddlcarower" runat="server" CssClass="j_select" AppendDataBoundItems="true">
                                                             <asp:ListItem Value="-1">车辆所有人</asp:ListItem>
                                                             <asp:ListItem Value="0" Text="自带"></asp:ListItem>
                                                             <asp:ListItem Value="1" Text="公司"></asp:ListItem>


                                                         </asp:DropDownList>

                                                &nbsp;

                                                         <asp:DropDownList runat="server" ID="tbcartype">
                                                             <asp:ListItem Value="-1">车辆</asp:ListItem>
                                                             <asp:ListItem Value="电动车" Text="电动车"></asp:ListItem>
                                                             <asp:ListItem Value="摩托车" Text="摩托车"></asp:ListItem>
                                                             <asp:ListItem Value="面包车" Text="面包车"></asp:ListItem>
                                                             <asp:ListItem Value="小车" Text="小车"></asp:ListItem>
                                                         </asp:DropDownList>
                                                &nbsp;

                                            </td>
                                        </tr>




                                        <tr>
                                            <td align="right" class="tab_label"></td>
                                            <td>








                                                <asp:Button runat="server" ID="Button1" class="form-button" Text="搜索" OnClick="btSearch_Click" OnClientClick="return j_submitdata('postdata')" />

                                                <asp:Button runat="server" ID="btyestoday" class="form-button" Text="昨天" OnClick="settime_Click" />
                                                <asp:Button runat="server" ID="tbtoday" class="form-button" Text="今天" OnClick="settime_Click" />
                                                <asp:Button runat="server" ID="btpre" class="form-button" Text="前一天" OnClick="settime_Click" />
                                                <asp:Button runat="server" ID="btnext" class="form-button" Text="后一天" OnClick="settime_Click" />
                                                <asp:Button runat="server" ID="tbweek" class="form-button" Text="本周" OnClick="settime_Click" />
                                                <asp:Button runat="server" ID="tbmonth" class="form-button" Text="本月" OnClick="settime_Click" />
                                                <asp:Button runat="server" ID="tbyear" class="form-button" Text="本年" OnClick="settime_Click" />

                                                <asp:Button runat="server" ID="Button2" class="form-button" Text="导出" OnClick="btExport_Click" />

                                            </td>
                                        </tr>
                                    </table>
                                    <div class="clear">
                                    </div>

                                </fieldset>





                                <fieldset class="AdminSearchform">
                                    <legend>统计</legend>
                                    <div style="clear: both; padding: 10px;">
                                        <span>总订单量:<span runat="server" id="lbordercount" style="margin-left: 20px; font-weight: bold; color: Red">0</span></span>

                                        <span style="margin-left: 20px;">配送费:<span runat="server" id="lballprice" style="margin-left: 20px; font-weight: bold; color: Red">0</span>元</span>



                                        <span style="margin-left: 20px;">抽成基数:<span runat="server" id="lbdelivergetfee_base" style="margin-left: 20px; font-weight: bold; color: Red">0</span>元</span>

                                        <span style="margin-left: 20px;">抽成:<span runat="server" id="lbDeliverGetSendFee" style="margin-left: 20px; font-weight: bold; color: Red">0</span>元</span>




                                        <span style="margin-left: 20px;">日均订单数:<span runat="server" id="lbperorder" style="margin-left: 20px; font-weight: bold; color: Red">0</span>单</span>
                                        <span style="margin-left: 20px;">日均配送费:<span runat="server" id="lbpersendfee" style="margin-left: 20px; font-weight: bold; color: Red">0</span>元</span>
                                        <span style="margin-left: 20px;">平均每单计时:<span runat="server" id="lbperordertime" style="margin-left: 20px; font-weight: bold; color: Red">0</span></span>
                                        <span style="margin-left: 20px;">平均每单配送时间:<span runat="server" id="lbpersendtime" style="margin-left: 20px; font-weight: bold; color: Red">0</span></span>


                                        <span style="margin-left: 20px;">超时订单数:<span runat="server" id="timeoutcount" style="margin-left: 20px; font-weight: bold; color: Red">0</span></span>
                                        <span style="margin-left: 20px;">超时率:<span runat="server" id="timeoutrat" style="margin-left: 20px; font-weight: bold; color: Red">0</span></span>

                                        <span style="margin-left: 20px;">距离:<span runat="server" id="lbcardpay" style="margin-left: 20px; font-weight: bold; color: Red">0</span>公里</span>

                                        <span style="margin-left: 20px;">代收金额:<span runat="server" id="lbadvance" style="margin-left: 20px; font-weight: bold; color: Red">0</span>元</span>

                                        <span style="margin-left: 20px;">佣金:<span runat="server" id="lbCommission" style="margin-left: 20px; font-weight: bold; color: Red">0</span>元</span>
                                    </div>




                                </fieldset>





                                <div class="scott">
                                    <webdiyer:AspNetPager CssClass="anpager" ID="AspNetPager1" runat="server" Width="100%"
                                        CustomInfoHTML="共有记录 <font>%RecordCount%</font> 条 当前为 <font>%CurrentPageIndex%</font>/<font>%PageCount%</font> 页"
                                        HorizontalAlign="Right" ShowCustomInfoSection="Left" CustomInfoTextAlign="Right"
                                        CustomInfoSectionWidth="27%" ShowPageIndexBox="Always" PageIndexBoxType="TextBox"
                                        TextBeforePageIndexBox="转到 " OnPageChanged="AspNetPager1_PageChanged" PageIndexBoxClass="flattext"
                                        ShowPageIndex="True" PageSize="50" SubmitButtonClass="flatbutton" SubmitButtonText="GO"
                                        TextAfterPageIndexBox=" 页 " Wrap="False" AlwaysShow="true">
                                    </webdiyer:AspNetPager>
                                </div>
                                <div id="sales_order_grid_massaction" style="clear: both;">
                                </div>

                                <div style="overflow: auto; width: 100%;">

                                    <table width="100%" class="summary tab_css_1">
                                        <tbody>
                                            <tr class="tr_css">

                                                <th style="width: 5%">编号
                                                </th>

                                                <th style="width: 15%">名称
                                                </th>

                                                <th style="width: 5%">分站
                                                </th>

                                                <th style="width: 5%">职位
                                                </th>


                                                <th style="width: 8%">日均配送费
                                                </th>
                                                <th style="width: 8%">日均订单数
                                                </th>

                                                <th style="width: 8%">配送费
                                                </th>
                                                  <th style="width: 8%">抽成基数
                                                </th>
                                                  <th style="width: 8%">抽成
                                                </th>


                                                <th style="width: 8%">代收金额
                                                </th>
                                                <th style="width: 8%">佣金
                                                </th>
                                                <th style="width: 8%">订单数
                                                </th>
                                                <th style="width: 6%">距离
                                                </th>

                                                <th style="width: 10%">平均每单计时
                                                </th>
                                                <th style="width: 10%">平均每单配送时间
                                                </th>
                                                <th style="width: 5%">超时
                                                </th>


                                            </tr>
                                            <asp:Repeater runat="server" ID="rptsum">
                                                <ItemTemplate>
                                                    <tr class="tr_css">

                                                        <td>
                                                            <%# Eval("IsDelete")%>
                                                        </td>
                                                        <td class="tableft">
                                                            <%# Eval("togoname") %>
                                                        </td>
                                                        <td class="tableft">
                                                            <%# Eval("Fetion") %>
                                                        </td>
                                                        <td class="tableft">
                                                            <%# Hangjing.WebCommon.WebHelper.TurnPost(Eval("grade").ToString())%>
                                                        </td>


                                                        <td>
                                                            <%# Eval("EBuilding")%>
                                                        </td>
                                                        <td>
                                                            <%# Eval("Tel")%>
                                                        </td>




                                                        <td>
                                                            <%# Eval("ShopHaveMoney")%>
                                                        </td>

                                                      
                                                        <td>
                                                            <%# Eval("delivergetfee_base")%>
                                                        </td>


                                                          <td>
                                                            <%# Eval("DeliverGetSendFee")%>
                                                        </td>
                                                        <td>
                                                            <%# Eval("Advance")%>
                                                        </td>
                                                        <td>
                                                            <%# Eval("Commission")%>
                                                        </td>
                                                        <td>

                                                            <a href='<%#Eval("Introduce") %>' target="_blank">
                                                                <%# Eval("allcount")%></a>


                                                        </td>

                                                        <td>
                                                            <%# Eval("cardpay")%>
                                                        </td>



                                                        <td>
                                                            <%# Eval("email")%>
                                                        </td>

                                                        <td>
                                                            <%# Eval("Address")%>
                                                        </td>

                                                        <td>
                                                            <%# Eval("timeoutcount")%>
                                                                
                                                        </td>
                                                    </tr>




                                                </ItemTemplate>
                                            </asp:Repeater>
                                        </tbody>
                                    </table>
                                </div>
                                <div class="clear">
                                </div>

                                <div class="scott">
                                    <webdiyer:AspNetPager runat="server" ID="AspNetPager2" CloneFrom="AspNetPager1">
                                    </webdiyer:AspNetPager>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
                <!--foot start-->

            </div>
            <uc2:Foot runat="server" ID="FootUC" />
            <!--foot end-->
        </div>
    </form>
</body>
</html>
